Developer Guide (API Reference) > Flash Viewer > Flash Vars |
Name |
Description |
Default Value |
Values |
allowAutomaticResize | When present and set to "No", prevents pages that are smaller than the available window space from automatically scaling up to fit the space. Otherwise, all document pages will scale to fit in the available space on document load. | Yes | Yes/No |
XMLSettingsURL |
Pass settings xml file as flash variable. |
settingsenterprise.xml |
- |
docLoadDelay |
Controls the request time between each page. |
100 |
10 + any numeric value |
documentname |
Name of document to be displayed. |
Name String Value (Required) |
Any String |
startPage |
Page that should load when viewer opens. |
1 (Required) |
1 to any. Cannot have value as 0 or any alphanumeric digits or negative numbers. |
loadPagesSequentially |
Controls the order of page loading and the behavior for unloaded pages. When this variable is set to “Yes”, the viewer loads pages sequentially and adds them to the end of the current list of pages. When this variable is set to “No”, the viewer reserves space for pages that it has not yet loaded so the end user can scroll to them. In that case, the viewer may request visible pages from the server prior to receiving earlier pages. Setting this variable to “No” will often dramatically increase the number of requests for pages that are not yet cached on the server. For this reason, the server needs to be carefully constructed to avoid performance problems. For more information, refer to the Using loadPagesSequentially Flash Variable topic. |
Yes | Yes/No |
toolbarButtonSize |
Changes the size of the buttons in the toolbar. |
36 |
Any numeric value |
hideToolbarCategories |
Turns on/off the category names in the toolbar. |
Yes |
Yes/No |
toolbar |
Removes toolbar all together. |
Yes |
Yes/No |
interfaceColor |
Changes the toolbar color. |
0xff0000
|
Any hex code |
saveDocument (Requires setting of saveDocumentLocation)
|
Removes the save document options from all tabs. |
Yes
|
Yes/No |
saveDocumentLocation |
Works with save button and points to original document or any other document rendition (such as pdf). |
None |
Link to the Original Document or pdf format of Original Document Example: http://www.testsite.com/ documents/originaldoc.doc |
ignoreExternalLinks |
Turns off the external links on the document. |
No |
If set to Yes, when external links are clicked, they will not be opened automatically. (Look at JavaScript events viewerOnExternalLinkClick & viewerOnInternalLinkClick for using in relation to this parameter) |
copyText
|
Disables the option to copy text to clipboard from the viewer. |
Yes |
Yes/No |
jsFullscreen
|
Traps full screen button event. Disables fullscreen event of viewer. Setting jsFullscreen=Yes allows override of the fullscreen event. Set jsFullscreen=Yes and then on JS event viewerOnDocumentFullScreen (documentname) change viewer height/width to needed. |
No |
Yes/No |
searchTab |
Turns search tab on/off. |
Yes |
Yes/No |
viewTab |
Turns view tab on/off. |
Yes |
Yes/No |
translationTool |
Turns translation on/off. |
Yes |
Yes/No |
selectedTab |
Tab to select when document first loads. |
Home |
Name of the tab. Example: selectedTab:’Home’ selectedTab:’Search’ selectedTab:’खोज’
If using translation, pass the translated tab name to load it on document load. |
showThumbnailsByDefault | When present and set to "Yes", creates a split view of the document that allows users to view a vertical strip of resizable thumbnails on the left side of the document area. | No | Yes/No |
defaultThumbnailWidth | Specifies the width of the thumbnail column (if "showThumbnailsByDefault" is set to Yes) and the size of the thumbnails, the first time the viewer is loaded. | 170 | Any number between 100 and 400 inclusive. |
Name |
Description |
Default Value |
Values |
buttonHomeSave buttonHomePrint buttonHomeZoom buttonHomeFit buttonHomeLeft buttonHomeRight buttonHomeClip buttonHomeFullscreen buttonSearch buttonSearchFullScreen buttonViewFit buttonViewRotate buttonViewThumbs buttonViewFullScreen buttonTranslateFullscree |
Allows you to independently turn off buttons on Home tab. Example: buttonHomeZoom=No |
Yes All buttons are on by default. |
Yes/No |
Name |
Description |
Default Value | Values |
printOptionPrintAll |
Allows you to remove Print All Pages options in the print dialog box. |
Yes |
Yes/No |
printOptionPrintPageRange |
Allows you to remove Print Page Range option in the print dialog box. |
Yes |
Yes/No |
printOptionPrintCurrentPage |
Allows you to remove Print Current Page option in the print dialog box. |
Yes |
Yes/No |
Adding custom tabs with custom buttons:
(Only 1 custom tab is allowed with up to 3 buttons)
Name |
Description |
customTabName |
Name of custom tab. |
customTabCategoryName |
Category name for custom buttons. All buttons get added to 1 category. |
customButton1Image |
Image to appear on button. |
customButton1Url |
URL to go to when button is clicked. |
customButton1Target |
Target for url, like _blank, _top, etc. |
customButton1Tooltip |
Tooltip for the custom button. |
Name |
Description |
Default Value |
Values |
searchQuery |
Load viewer with search keywords highlighted. |
None |
Can be any keywords in the document |
highlightsLinksXML |
Pass search variables in xml form. |
None |
xml |
highlightsLinksXMLURL |
Pass search variables in a url to a xml. |
None |
Link to xml |
Example searchQuery
Loading Viewer with first “Magic” search keyword pre-highlighted and then let user jump to next “Magic” keyword in document.
Search Variables: searchQuery=Magic
Passing multiple variables to load for search.
Search Variables: searchQuery=Magic|this
| is the delimiter
Example highlightsLinksXML or highlightsLinksXMLURL
highlightsLinksXML = "<root><actions><action type=’…….”
highlightsLinksXMLURL = 'highlights.xml'
Sample highlight.xml |
Copy Code
|
---|---|
<root> <actions> <action type='addLink'><link documentname="Sample.doc" id="test123" userid="" tooltip="" mode="ByText" occurance="all" page="2" allowDelete="true" color="16776960" start="0" end="0" annotation="0" link=”http://www.yahoo.com” editable=”0”><![CDATA[the]]></link> </action> <action type='addHighlight'> <highlight documentname=" Sample.doc " id="test123" userid="" tooltip="" mode="ByText" occurance="all" page="2" allowDelete="true" color="16776960" start="0" end="0" annotation="0" editable=”0”><![CDATA[this]]></highlight> </action> </actions> </root> |
Setting editable="0" will not open the highlight options when clicked on the highlighted text or link.
Prizm Content Connect Plus can load optional annotation flash parameters to let you fully embed it, with markup capabilities, as a part of your application.
The following cpde example shows multiple variables:
Copy Code
|
|
---|---|
<script src="jquery-1.4.2.min.js” language="javascript"></script>
|
Name |
Description |
Default Value |
Values |
reviewTab |
Turns review tab on or off. |
Yes |
Yes/No |
redactionEditor | Turns the Redact tab on or off. | Yes | Yes/No |
turnOffClickMenu |
Turns off the on click menu when set to Yes. On Click menu shows options such as “Add Link”, “Add Highlight”, “Copy Text”. |
No |
Yes/No |
saveAnnotation
|
Enables users to save annotations, or disables save. |
Yes |
Yes/No |
openAnnotation
|
Enables or disables opening of annotation files by the users. Example use case: pre-load an annotation (use loadAnnotation) and disable opening other annotations. |
Yes |
Yes/No |
loadAnnotation |
Pre-loads annotations. |
None |
Annotation file name |
saveAnnotationAs |
Forces annotation xml to be saved automatically by the defined name. (Disables the annotation save popup.) |
None |
Annotation file name |
stamps |
Sets predefined Stamp values. If no stamp values are set, Stamp selector appears blank. Required to be set. |
APPROVED|REVIEWED|REJECTED |
stamps=APPROVED|DENIED|REVIEW|REJECTED
Pass stamps as text separated by a pipe delimiter "|". |
printAnnotations |
Turns on/off the print annotations option checkbox. (Print Annotation checkbox appears when users click on Print button in Viewer.) |
Yes |
Yes/No |
formUser | Tells the document who the active user is and uses the information to tag annotations. | Blank | User name |
annotationTooltipsEnabled | Enables mouseover tooltips on annotations and redactions IF formUser is also specified. | No | Yes/No |
showOffsetFromGMT | Tells the annotation tooltips to display the creation time in terms of offset from GMT instead of simply local time. | No | Yes/No |
markCreationEnabled | Turns creation of annotations on or off. | Yes | Yes/No |
redactionReasons | Allows tagging of redactions with a choice of explanations, provided in the flash var value. Explanations are overlaid on the annotation object for easy viewing. | None | Pass reasons as text separated by a pipe delimiter "|". |
redactionReasonFontSize | Allows the user to specify the font size for the redaction reason text. | 10 | Numerical values greater than 0. |
defaultAnnotationFontSize | Specifies the default font size to use for text annotations. | 11 | Numerical integrer values greater than 0. |
defaultAnnotationFontColor | Specifies the default font color to use for text annotations. | 0x000000 (black) | Hex formatted numbers between 0x000000 and 0xFFFFFF. |
defaultAnnotationFont | Specifies the default font to use for text annotations. | Verdana | Refer to the annotation font list located below this table. |
defaultAnnotationBackgroundColor | Specifies the default background color to use for text annotation. | Transparent, if no color is specified. | Hex formatted numbers between 0x000000 and 0xFFFFFF. |
defaultRedactionFontSize | Specifies the default font size to use for text redactions. | 11 | Numerical integrer values greater than 0. |
defaultRedactionFontColor | Specifies the default font color to use for text redactions. | 0x000000 (black) | Hex formatted numbers between 0x000000 and 0xFFFFFF. |
defaultRedactionFont | Specifies the default font to use for text redactions. | Arial | Refer to the redaction list located below this table. |
defaultRedactionBackgroundColor | Specifies the default background color to use for text redactions. | Transparent, if no color is specified. | Hex formatted numbers between 0x000000 and 0xFFFFFF. |
Annotation Font List:
_sans, _serif, _typewriter, Arial, Courier, Courier New, Geneva, Georgia, Helvetica, Times New Roman, Times, Verdana
Redaction Font List:
Arial, Courier, Courier New, Helvetica, Times New Roman, Symbol
Name | Description | Default Value | Values |
buttonReviewStamp | When present and set to "No", hides the stamp annotation tool button. | Yes | Yes/No |
buttonRedactStamp | When present and set to "No", hides the stamp redaction tool button. | Yes | Yes/No |